<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>人力资源管理</title>
    <%@ include file="/WEB-INF/views/common/common.jsp" %>
    <script type="text/javascript" src="/static/js/system/staff.js"></script>
</head>
<body>
<%--列表--%>
<table id="staff_datagrid" , align="center"></table>
<%--人力资源列表顶部工具栏--%>
<div id="staff_toolbar">
    姓名&nbsp;&nbsp;<input id="name" class="easyui-textbox" name="name">&nbsp;&nbsp;&nbsp;&nbsp;
    应聘方式&nbsp;&nbsp;<input id="way" class="easyui-combobox"  data-options="
                                            url:'/dataDict/datas?perentId=42',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'">&nbsp;&nbsp;&nbsp;&nbsp;
    职务&nbsp;&nbsp;<input id="duty" class="easyui-combobox" name="duty.id" data-options="
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
                                            url:'/dataDict/datas?perentId=22'">&nbsp;&nbsp;&nbsp;&nbsp;
    学历&nbsp;&nbsp;<input id="education" class="easyui-combobox" name="education.id" data-options="
                                            url:'/dataDict/datas?perentId=17',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'">&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" data-cmd="reload">查询</a>
    <br>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" data-cmd="add">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-man',plain:true" data-cmd="particular">详细信息</a>
</div>
<%--家庭情况列表顶部工具栏--%>
<div id="familyBackground_toolbar">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
       onclick="staff_addRow('familyBackground_datagrid')">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
       onclick="staff_destroyRow('familyBackground_datagrid')">删除</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" data-cmd="save">保存</a>
</div>
<%--工作经历列表顶部工具栏--%>
<div id="workExperience_toolbar">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
       onclick="staff_addRow('workExperience_datagrid')">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
       onclick="staff_destroyRow('workExperience_datagrid')">删除</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" data-cmd="save">保存</a>
</div>
<%--教育情况列表顶部工具栏--%>
<div id="situationOfEducation_toolbar">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
       onclick="staff_addRow('situationOfEducation_datagrid')">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
       onclick="staff_destroyRow('situationOfEducation_datagrid')">删除</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" data-cmd="save">保存</a>
</div>
<%--培训情况列表顶部工具栏--%>
<div id="trainingSituation_toolbar">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
       onclick="staff_addRow('trainingSituation_datagrid')">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
       onclick="staff_destroyRow('trainingSituation_datagrid')">删除</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" data-cmd="save">保存</a>
</div>
<%--其它情况列表顶部工具栏--%>
<div id="otherCases_toolbar">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
       onclick="staff_addRow('otherCases_datagrid')">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
       onclick="staff_destroyRow('otherCases_datagrid')">删除</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" data-cmd="save">保存</a>
</div>

<%--详细信息框--%>
<div id="particular_tabs" class="easyui-tabs" align="center">
    <div id="personageSalary_datagrid" title="工资信息" style="overflow:auto;padding:5px;display:none;">
        <div id="win" fit="true" style="width:920px;height:515px ;"
             data-options="iconCls:'icon-save',modal:true">
            <div class="easyui-layout" data-options="fit:true">
                <div data-options="region:'north',split:true" align="center" style="height:430px">
                    <form method="post" id="personageSalary_form">
                        <input type="hidden" name="id">
                        <table style="margin-top:0px" cellpadding="2">
                            <tr>
                                <td>部门</td>
                                <td><input class="easyui-combobox" name="department.id" data-options="width:150 ,height:30,readonly:true,
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
                                            url:'/department/depts'"></td>

                                &nbsp;&nbsp;&nbsp;<td>工资类型</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-combobox" name="scaleType.id" data-options="width:150 ,height:30,valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
                                            url:'/dataDict/datas?perentId=97'"></td>

                                &nbsp;&nbsp;&nbsp;<td>账号类型</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-combobox" name="accountType.id" data-options="width:150 ,height:30,valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
                                            url:'/dataDict/datas?perentId=94'"></td>

                                &nbsp;&nbsp;&nbsp;<td>账号</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="accountNumber" data-options="
                                            width:150 ,height:30"></td>
                            </tr>
                            <tr>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <%---------------------------------%>
                            <tr>
                                <td>职务</td>
                                <td><input class="easyui-combobox" name="duty.id" data-options="width:150 ,height:30,readonly:true,
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
                                            url:'/dataDict/datas?perentId=22'"></td>
                                &nbsp;&nbsp;&nbsp;<td>基本工资</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="basePay" data-options="width:150 ,height:30">
                                </td>

                                &nbsp;&nbsp;&nbsp;<td>岗贴</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="postSubsidy"
                                           data-options="width:150 ,height:30"></td>

                                &nbsp;&nbsp;&nbsp;<td>技贴</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="skillSubsidy" data-options="
                                            width:150 ,height:30"></td>
                            </tr>
                            <%-----------------------------------%>
                            <tr>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <td>岗位级别</td>
                                <td><input class="easyui-combobox" name="postrank.id" data-options=" width:150 ,height:30,readonly:true,
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
url:'/dataDict/datas?perentId=63'"></td>
                                &nbsp;&nbsp;&nbsp;<td>奖金类型</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-combobox" name="bonusTypes.id" data-options="width:150 ,height:30,
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
url:'/dataDict/datas?perentId=108'"></td>

                                &nbsp;&nbsp;&nbsp;<td>职位奖金系数</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="bonusCoefficient"
                                           data-options="width:150 ,height:30"></td>

                                &nbsp;&nbsp;&nbsp;<td>部门奖金系数</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="departmentCoefficient" data-options="
                                            width:150 ,height:30"></td>
                            </tr>
                            <%-----------------------------------%>
                            <tr>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <td>岗位</td>
                                <td><input class="easyui-combobox" name="post.id" data-options="width:150 ,height:30,readonly:true,
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
url:'/dataDict/datas?perentId=48'"></td>
                                &nbsp;&nbsp;&nbsp;<td>奖金基数</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="skillCoefficient"
                                           data-options="width:150 ,height:30"></td>

                                &nbsp;&nbsp;&nbsp;<td>加班类型</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="otType.id" data-options="width:150 ,height:30,valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
url:'/dataDict/datas?perentId=111'"></td>

                                &nbsp;&nbsp;&nbsp;<td>养老保险</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="endowment" data-options="
                                            width:150 ,height:30"></td>
                            </tr>

                            <%-----------------------------------%>
                            <tr>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <td>聘用方式</td>
                                <td><input class="easyui-combobox" name="way.id" data-options="width:150 ,height:30,readonly:true,
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
url:'/dataDict/datas?perentId=42'"></td>
                                &nbsp;&nbsp;&nbsp;<td>失业保险</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="unemployment"
                                           data-options="width:150 ,height:30"></td>

                                &nbsp;&nbsp;&nbsp;<td>基本医疗</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="basicMedicalCare"
                                           data-options="width:150 ,height:30"></td>

                                &nbsp;&nbsp;&nbsp;<td>补充医疗</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="complementaryMedicine" data-options="
                                            width:150 ,height:30"></td>
                            </tr>
                            <%-----------------------------------%>
                            <tr>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <td>户口类型</td>
                                <td><input class="easyui-combobox" name="permanent.id" data-options="width:150 ,height:30,readonly:true,
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
url:'/dataDict/datas?perentId=55'"></td>
                                &nbsp;&nbsp;&nbsp;<td>生育保险</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="maternityInsurance"
                                           data-options="width:150 ,height:30">
                                </td>

                                &nbsp;&nbsp;&nbsp;<td>公积金</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="accumulationFund"
                                           data-options="width:150 ,height:30"></td>

                                &nbsp;&nbsp;&nbsp;<td>其它扣款</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="otherDeductions" data-options="
                                            width:150 ,height:30"></td>
                            </tr>

                            <%-----------------------------------%>
                            <tr>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <%--<td>社保总金额</td>
                                <td><input class="easyui-textbox"
                                           data-options="width:150 ,height:30"></td>--%>
                                &nbsp;&nbsp;&nbsp;<td>其它补足</td>&nbsp;&nbsp;&nbsp;
                                <td><input class="easyui-textbox" name="otherComplement"
                                           data-options="width:150 ,height:30"></td>
                            </tr>
                        </table>
                    </form>
                </div>
                <div data-options="region:'center'" align="center" style="height:70px">
                    <div id="dialog_btons">
                        <br>
                        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true"
                           style="width: 10%;height: 80%" ,size:large,
                           data-cmd="personageSalary_save">保存</a>
                        <a href="#" class="easyui-linkbutton" data-options=" plain : true ,iconCls:'icon-no',plain:true"
                           style="width: 10%;height: 80%;"
                           data-cmd="personageSalary_closes">关闭</a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div title="家庭情况" style="padding:5px;display:none;">
        <table id="familyBackground_datagrid" , align="center"></table>
    </div>
    <div title="工作经历" style="padding:5px;display:none;">
        <table id="workExperience_datagrid" , align="center"></table>
    </div>
    <div title="教育情况" style="padding:5px;display:none;">
        <table id="situationOfEducation_datagrid" , align="center"></table>
    </div>
    <div title="培训情况" style="padding:5px;display:none;">
        <table id="trainingSituation_datagrid" , align="center"></table>
    </div>
    <div title="其它情况" style="padding:5px;display:none;">
        <table id="otherCases_datagrid" , align="center"></table>
    </div>
    <div title="身份证照" style="padding:5px;display:none;">
        <form name="editForm" action="/product/saveOrUpdate" method="post"
              id="editForm" enctype="multipart/form-data">
            <div id="cc" class="easyui-layout" style="width:920px;height:370px;">
                <div data-options="region:'center' ,align:'center'" style="top:300px;padding:30px ;">
                    <center>
                        <img src= "/upload/xxx.jpg" width="230px"/>
                    </center>
                </div>
            </div>
            <br></br>
            <br></br>
            <div align="center">
                <tr>
                    <input id="staff_filebox" name="pic" class="easyui-filebox" style="width:300px">
                    <br></br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a id="btn" href="#" class="easyui-linkbutton" data-cmd="save_picture">上传图片</a>
                </tr>
            </div>
        </form>
    </div>
</div>

<%--保存/编辑 对话框--%>
<div id="staff_dialog">
    <form method="post" id="staff_form">
        <input type="hidden" name="id">
        <table align="center" style="margin-top:15px" align="right" cellpadding="2">
            <tr>
                <td>工号</td>
                <td><input class="easyui-textbox" name="jobNumber"></td>

                <td>姓名</td>
                <td><input class="easyui-textbox" name="name"></td>

                <td>部门</td>
                <td><input class="easyui-combobox" name="department.id" data-options="
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
                                            url:'/department/depts'"></td>

                <td>职务</td>
                <td><input class="easyui-combobox" name="duty.id" data-options="
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto',
                                            url:'/dataDict/datas?perentId=22'"></td>
            </tr>


            <tr>
                <td>&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td>聘用方式&nbsp;</td>
                <td><input class="easyui-combobox" name="way.id" data-options="
                                            url:'/dataDict/datas?perentId=42',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"
                ></td>
                <td>学历</td>
                <td><input class="easyui-combobox" name="education.id" data-options="
                                            url:'/dataDict/datas?perentId=17',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"
                ></td>
                <td>岗位</td>
                <td><input class="easyui-combobox" name="post.id" data-options="
                                            url:'/dataDict/datas?perentId=48',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"
                ></td>
                <td>性别</td>
                <td><input class="easyui-combobox" name="gender.id" data-options="
                                            url:'/dataDict/datas?perentId=6',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"></td>
            </tr>


            <tr>
                <td>&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td>年龄</td>
                <td><input class="easyui-textbox" name="age"></td>
                <td>籍贯</td>
                <td><input class="easyui-combobox" name="place.id" data-options="
                                            url:'/dataDict/datas?perentId=60',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"></td>
                <td>电话</td>
                <td><input class="easyui-textbox" name="phone"></td>
                <td>考勤卡</td>
                <td><input class="easyui-textbox" name="checkNumber"></td>
            </tr>

            <tr>
                <td>&nbsp;&nbsp;</td>
            </tr>


            <tr>
                <td>岗位级别</td>
                <td><input class="easyui-combobox" name="postrank.id" data-options="
                                            url:'/dataDict/datas?perentId=63',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"></td>
                <td>邮箱</td>
                <td><input class="easyui-textbox" name="email"></td>
                <td>民族</td>
                <td><input class="easyui-combobox" name="nation.id" data-options="
                                            url:'/dataDict/datas?perentId=69',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"></td>
                <td>身份证</td>
                <td><input class="easyui-textbox" name="identitycard"></td>
            </tr>

            <tr>
                <td>&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td>政治面貌</td>
                <td><input class="easyui-combobox" name="politics.id" data-options="
                                            url:'/dataDict/datas?perentId=72',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"></td>
                <td>出生日期</td>
                <td><input class="easyui-datebox" name="dateofbirth"></td>
                <td>进厂日期</td>
                <td><input class="easyui-datebox" name="duration"></td>
                <td>工龄</td>
                <td><input class="easyui-textbox" name="seniority"></td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td>户口类型&nbsp;</td>
                <td><input class="easyui-combobox" name="permanent.id" data-options="
                                            url:'/dataDict/datas?perentId=55',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"></td>
                <td>婚否</td>
                <td><input class="easyui-combobox" name="marital.id" data-options="
                                            url:'/dataDict/datas?perentId=90',
                                            valueField: 'id',
                                            textField: 'name',
                                            panelHeight: 'auto'"></td>
                <td>家庭住址</td>
                <td><input class="easyui-textbox" name="home"></td>
            <tr/>
            <tr>
                <td>&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td>备注</td>
                <td colspan="10"><input class="easyui-textbox" name="remark" style="width:500px ;height: 100px"></td>
            </tr>
        </table>
    </form>
</div>


<%--保存/编辑 对话框 底部工具栏 --%>
<div id="dialog_buttons">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" data-cmd="save">保存</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-no',plain:true" data-cmd="closes">关闭</a>
</div>
</body>

</html>